package com.dynabook.ems.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dynabook.ems.common.BaseResponse;
import com.dynabook.ems.model.dto.WorkOrderBomDetailRequest;
import com.dynabook.ems.model.dto.WorkOrderBomSimpleRequest;
import com.dynabook.ems.model.entity.EmsBomDetail;
import com.dynabook.ems.model.vo.WorkOrderBomDetailVO;
import com.dynabook.ems.model.vo.WorkOrderBomSimpleVO;

/**
* @author tester
* @description 针对表【ems_bom_detail】的数据库操作Service
* @createDate 2025-07-21 15:20:05
*/
public interface EmsBomDetailService extends IService<EmsBomDetail> {

/**
 * 根据详情ID删除BOM详情
 * @param detailId BOM详情ID
 * @return 删除结果
 */
BaseResponse<Boolean> deleteBomDetailById(Long detailId);

    
    /**
     * 根据工单号更新BOM详情状态为待选状态
     * @param workOrderNumber 工单号
     * @return 更新结果
     */
    BaseResponse<Boolean> updateDetailStatusByWorkOrder(String workOrderNumber,Integer totalNumber);
    
    /**
     * 分页查询工单下的BOM详细信息
     * @param request 查询请求（包含分页参数）
     * @return BOM详细信息
     */
    BaseResponse<WorkOrderBomDetailVO> getBomDetailByWorkOrderNumber(WorkOrderBomDetailRequest request);

    /**
     * 根据工单号查询BOM详情简化信息
     * @param request 查询请求
     * @return BOM详情简化信息
     */
    BaseResponse<WorkOrderBomSimpleVO> getBomSimpleDetailByWorkOrderNumber(WorkOrderBomSimpleRequest request);

}
